Optimal. Leaf size=186 \[ \frac {2 (g+h x) \left (c \left (2 a e-b \left (\frac {a f}{c}+d\right )\right )-x \left (-2 a c f+b^2 f-b c e+2 c^2 d\right )\right )}{c \left (b^2-4 a c\right ) \sqrt {a+b x+c x^2}}+\frac {h \sqrt {a+b x+c x^2} \left (-8 a c f+3 b^2 f-2 b c e+4 c^2 d\right )}{c^2 \left (b^2-4 a c\right )}-\frac {\tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) (3 b f h-2 c (e h+f g))}{2 c^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.23, antiderivative size = 186, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {1644, 640, 621, 206} \[ \frac {2 (g+h x) \left (c \left (2 a e-b \left (\frac {a f}{c}+d\right )\right )-x \left (-2 a c f+b^2 f-b c e+2 c^2 d\right )\right )}{c \left (b^2-4 a c\right ) \sqrt {a+b x+c x^2}}+\frac {h \sqrt {a+b x+c x^2} \left (-8 a c f+3 b^2 f-2 b c e+4 c^2 d\right )}{c^2 \left (b^2-4 a c\right )}-\frac {\tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) (3 b f h-2 c (e h+f g))}{2 c^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 621
Rule 640
Rule 1644
Rubi steps
\begin {align*} \int \frac {(g+h x) \left (d+e x+f x^2\right )}{\left (a+b x+c x^2\right )^{3/2}} \, dx &=\frac {2 \left (c \left (2 a e-b \left (d+\frac {a f}{c}\right )\right )-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x\right ) (g+h x)}{c \left (b^2-4 a c\right ) \sqrt {a+b x+c x^2}}-\frac {2 \int \frac {-\frac {b^2 f g+2 b (c d+a f) h-4 a c (f g+e h)}{2 c}-\frac {1}{2} \left (4 c d-2 b e-8 a f+\frac {3 b^2 f}{c}\right ) h x}{\sqrt {a+b x+c x^2}} \, dx}{b^2-4 a c}\\ &=\frac {2 \left (c \left (2 a e-b \left (d+\frac {a f}{c}\right )\right )-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x\right ) (g+h x)}{c \left (b^2-4 a c\right ) \sqrt {a+b x+c x^2}}+\frac {\left (4 c^2 d+3 b^2 f-2 c (b e+4 a f)\right ) h \sqrt {a+b x+c x^2}}{c^2 \left (b^2-4 a c\right )}-\frac {(3 b f h-2 c (f g+e h)) \int \frac {1}{\sqrt {a+b x+c x^2}} \, dx}{2 c^2}\\ &=\frac {2 \left (c \left (2 a e-b \left (d+\frac {a f}{c}\right )\right )-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x\right ) (g+h x)}{c \left (b^2-4 a c\right ) \sqrt {a+b x+c x^2}}+\frac {\left (4 c^2 d+3 b^2 f-2 c (b e+4 a f)\right ) h \sqrt {a+b x+c x^2}}{c^2 \left (b^2-4 a c\right )}-\frac {(3 b f h-2 c (f g+e h)) \operatorname {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )}{c^2}\\ &=\frac {2 \left (c \left (2 a e-b \left (d+\frac {a f}{c}\right )\right )-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x\right ) (g+h x)}{c \left (b^2-4 a c\right ) \sqrt {a+b x+c x^2}}+\frac {\left (4 c^2 d+3 b^2 f-2 c (b e+4 a f)\right ) h \sqrt {a+b x+c x^2}}{c^2 \left (b^2-4 a c\right )}-\frac {(3 b f h-2 c (f g+e h)) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{2 c^{5/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.73, size = 205, normalized size = 1.10 \[ \frac {\frac {2 \sqrt {c} \left (4 c \left (2 a^2 f h-a c (d h+e (g+h x)+f x (g-h x))+c^2 d g x\right )+b^2 (c x (2 e h+2 f g-f h x)-3 a f h)+2 b c (a e h+a f (g+5 h x)+c d (g-h x)-c e g x)-3 b^3 f h x\right )}{\sqrt {a+x (b+c x)}}+\left (b^2-4 a c\right ) \log \left (2 \sqrt {c} \sqrt {a+x (b+c x)}+b+2 c x\right ) (3 b f h-2 c (e h+f g))}{2 c^{5/2} \left (4 a c-b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 14.45, size = 905, normalized size = 4.87 \[ \left [-\frac {{\left (2 \, {\left (a b^{2} c - 4 \, a^{2} c^{2}\right )} f g + {\left (2 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} f g + {\left (2 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} e - 3 \, {\left (b^{3} c - 4 \, a b c^{2}\right )} f\right )} h\right )} x^{2} + {\left (2 \, {\left (a b^{2} c - 4 \, a^{2} c^{2}\right )} e - 3 \, {\left (a b^{3} - 4 \, a^{2} b c\right )} f\right )} h + {\left (2 \, {\left (b^{3} c - 4 \, a b c^{2}\right )} f g + {\left (2 \, {\left (b^{3} c - 4 \, a b c^{2}\right )} e - 3 \, {\left (b^{4} - 4 \, a b^{2} c\right )} f\right )} h\right )} x\right )} \sqrt {c} \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} + 4 \, \sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {c} - 4 \, a c\right ) - 4 \, {\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} f h x^{2} - 2 \, {\left (b c^{3} d - 2 \, a c^{3} e + a b c^{2} f\right )} g + {\left (4 \, a c^{3} d - 2 \, a b c^{2} e + {\left (3 \, a b^{2} c - 8 \, a^{2} c^{2}\right )} f\right )} h - {\left (2 \, {\left (2 \, c^{4} d - b c^{3} e + {\left (b^{2} c^{2} - 2 \, a c^{3}\right )} f\right )} g - {\left (2 \, b c^{3} d - 2 \, {\left (b^{2} c^{2} - 2 \, a c^{3}\right )} e + {\left (3 \, b^{3} c - 10 \, a b c^{2}\right )} f\right )} h\right )} x\right )} \sqrt {c x^{2} + b x + a}}{4 \, {\left (a b^{2} c^{3} - 4 \, a^{2} c^{4} + {\left (b^{2} c^{4} - 4 \, a c^{5}\right )} x^{2} + {\left (b^{3} c^{3} - 4 \, a b c^{4}\right )} x\right )}}, -\frac {{\left (2 \, {\left (a b^{2} c - 4 \, a^{2} c^{2}\right )} f g + {\left (2 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} f g + {\left (2 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} e - 3 \, {\left (b^{3} c - 4 \, a b c^{2}\right )} f\right )} h\right )} x^{2} + {\left (2 \, {\left (a b^{2} c - 4 \, a^{2} c^{2}\right )} e - 3 \, {\left (a b^{3} - 4 \, a^{2} b c\right )} f\right )} h + {\left (2 \, {\left (b^{3} c - 4 \, a b c^{2}\right )} f g + {\left (2 \, {\left (b^{3} c - 4 \, a b c^{2}\right )} e - 3 \, {\left (b^{4} - 4 \, a b^{2} c\right )} f\right )} h\right )} x\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {-c}}{2 \, {\left (c^{2} x^{2} + b c x + a c\right )}}\right ) - 2 \, {\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} f h x^{2} - 2 \, {\left (b c^{3} d - 2 \, a c^{3} e + a b c^{2} f\right )} g + {\left (4 \, a c^{3} d - 2 \, a b c^{2} e + {\left (3 \, a b^{2} c - 8 \, a^{2} c^{2}\right )} f\right )} h - {\left (2 \, {\left (2 \, c^{4} d - b c^{3} e + {\left (b^{2} c^{2} - 2 \, a c^{3}\right )} f\right )} g - {\left (2 \, b c^{3} d - 2 \, {\left (b^{2} c^{2} - 2 \, a c^{3}\right )} e + {\left (3 \, b^{3} c - 10 \, a b c^{2}\right )} f\right )} h\right )} x\right )} \sqrt {c x^{2} + b x + a}}{2 \, {\left (a b^{2} c^{3} - 4 \, a^{2} c^{4} + {\left (b^{2} c^{4} - 4 \, a c^{5}\right )} x^{2} + {\left (b^{3} c^{3} - 4 \, a b c^{4}\right )} x\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.28, size = 271, normalized size = 1.46 \[ \frac {{\left (\frac {{\left (b^{2} c f h - 4 \, a c^{2} f h\right )} x}{b^{2} c^{2} - 4 \, a c^{3}} - \frac {4 \, c^{3} d g + 2 \, b^{2} c f g - 4 \, a c^{2} f g - 2 \, b c^{2} d h - 3 \, b^{3} f h + 10 \, a b c f h - 2 \, b c^{2} g e + 2 \, b^{2} c h e - 4 \, a c^{2} h e}{b^{2} c^{2} - 4 \, a c^{3}}\right )} x - \frac {2 \, b c^{2} d g + 2 \, a b c f g - 4 \, a c^{2} d h - 3 \, a b^{2} f h + 8 \, a^{2} c f h - 4 \, a c^{2} g e + 2 \, a b c h e}{b^{2} c^{2} - 4 \, a c^{3}}}{\sqrt {c x^{2} + b x + a}} - \frac {{\left (2 \, c f g - 3 \, b f h + 2 \, c h e\right )} \log \left ({\left | -2 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} \sqrt {c} - b \right |}\right )}{2 \, c^{\frac {5}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.01, size = 735, normalized size = 3.95 \[ \frac {4 a b f h x}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}\, c}-\frac {3 b^{3} f h x}{2 \left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}\, c^{2}}+\frac {b^{2} e h x}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}\, c}+\frac {b^{2} f g x}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}\, c}-\frac {2 b d h x}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}-\frac {2 b e g x}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}+\frac {2 a \,b^{2} f h}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}\, c^{2}}-\frac {3 b^{4} f h}{4 \left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}\, c^{3}}+\frac {b^{3} e h}{2 \left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}\, c^{2}}+\frac {b^{3} f g}{2 \left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}\, c^{2}}-\frac {b^{2} d h}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}\, c}-\frac {b^{2} e g}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}\, c}+\frac {f h \,x^{2}}{\sqrt {c \,x^{2}+b x +a}\, c}+\frac {3 b f h x}{2 \sqrt {c \,x^{2}+b x +a}\, c^{2}}-\frac {e h x}{\sqrt {c \,x^{2}+b x +a}\, c}-\frac {f g x}{\sqrt {c \,x^{2}+b x +a}\, c}+\frac {2 \left (2 c x +b \right ) d g}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}-\frac {3 b f h \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 c^{\frac {5}{2}}}+\frac {e h \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{c^{\frac {3}{2}}}+\frac {f g \ln \left (\frac {c x +\frac {b}{2}}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{c^{\frac {3}{2}}}+\frac {2 a f h}{\sqrt {c \,x^{2}+b x +a}\, c^{2}}-\frac {3 b^{2} f h}{4 \sqrt {c \,x^{2}+b x +a}\, c^{3}}+\frac {b e h}{2 \sqrt {c \,x^{2}+b x +a}\, c^{2}}+\frac {b f g}{2 \sqrt {c \,x^{2}+b x +a}\, c^{2}}-\frac {d h}{\sqrt {c \,x^{2}+b x +a}\, c}-\frac {e g}{\sqrt {c \,x^{2}+b x +a}\, c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\left (g+h\,x\right )\,\left (f\,x^2+e\,x+d\right )}{{\left (c\,x^2+b\,x+a\right )}^{3/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (g + h x\right ) \left (d + e x + f x^{2}\right )}{\left (a + b x + c x^{2}\right )^{\frac {3}{2}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________